import some changes I made elsewhere