created a fuction that removes leading and precceding spaces