Added trim and format