ajax call implemented and front end connected