use XHR instead of a stupid history hack