added functionality for two players