before adding ajax calls