moved ajax calls to respective pages