little clean up of code