ADD: debug functions for remote queries