why are you removing stuff from this function? it should not be removed