ajax related code and common code added