Added Trim function