added ajax function to test ui