made more appropriate ajax call