added trim() to assure accuracy of identifying field name. also added test class