trimming names so no trailing spaces