bulk of name formatting logic done