removes unnessasary code