extend both grep implementations to support to grep for multiple terms into different files