added ajax call to backend