trim function fix