refactoring package partition
refactored QueryCallback