ajax working need to get implementation right