added ajax wrapper for testing