refactors to easier interface for work manager
adds some parameters for queries