started to rework query's to be fully dynamic