Update to use with xhr.php