now trim the input