- minor refactoring to sqlqueue