more testing: detail queries. todo: remove commented code