reimplementation of dotinstall lessons