Replace query src with lib call