split run_queries into functions and added leavers report