cleanup grep logic