trim leading and ending spaces