updated to take -e for limiting to file type