trim function

trim function