removed lc() and replaced with strtolower()