added ajax snippet