got rid of unneccsesary code