getting leaf_region working and fixing