cleaning and getting rid of extraneous code