changed syntax to use =~ operator, rather than grep method