finalized api. see ajaxtester.html