Naive version of grep