add part of trim function