adding copy feature and grep logic