Hooking up admin query

still needs work