added trim trailing white space on save