adding ajax call and cartouche handling