removes trailing spaces