fine tuning, code cleaning