eliminated duplicate ajax calls