got rid of the uneccessary code