Works with generic number of users.