improve code structure
extract query into an new module called xun