removal of unneccary code