fixed last line to use a string method