added waiting for players logic