get rid of white space and extra code