added grep function