got rid of uneccessary code