trim and lower case. better debug stmts.