removed some unnecesary code