some changes I made some time ago...