add queryManager, main, cmake