removing the duplciate ajax call