got rid of grep calls