added trim() to method and headers