moved lower casing of strings into sql query saves about 30% overhead