added ajax working code