untested additions and a fix