trim leading/ending white space from data input