Added trim functions