trim the word before gets inserted or lookedup