the present invention relates to a method for dewatering of sludge , wherein an aqueous solution of polymeric flocculating agent is added to the sludge , wherein the sludge comprises a component to be removed by the flocculating agent being added to the sludge , wherein in order to limit the residual amount of the flocculating agent in a filtrate of the sludge the method comprises a first and / or a second step , wherein the first step comprises — measuring a first content information related to the total amount of solid material in the sludge — measuring a second content information related to a sand material content in the sludge , wherein the first and second content information is used for controlling the addition of the aqueous solution of the polymeric flocculating agent to the sludge , wherein the second step comprises measuring a material information related to a material property of the filtrate , wherein the material information is used for controlling the content of the polymeric flocculating agent in the filtrate .