finish district sort and search function