added ajax to gameplay