reconfigured ajax setup