added stored queries processing