Changed ps grep function