fixes from Don's version to compile on my computer