removed hardcode min no of players and made it recursive.