rewrote subwired queries with correct wrappers