storing state of merge-leo before movign on to upgrade 4.7.0 to 5.0.0
merged Leo's KIM code