updated createUser method