fine tuning of the function