removes unneccessary code