changes and fixes per Terry