removed addUserToMap function as it was undefined.