added trim comment function