changed username to name in messagefactory