changed string comparisons to be all lowercase