big commit with entire body of code from .141 (older code)