add support for various number of players