changed formula image ajax logic