removes unecessary code