added basic ajax support