added createUser function