some code cleaning