sss_query redesigned