added tests, ajax always uses json