finish query and success