changed trim function to later (faster) version
initial commit