Reorged all MA query functions