number of queries succeeded; not clean code yet