bigger f*king mess, now with stand alone ajax wrapper