finally got ajax wokring