changed: function stack; added: test coverage; removed: cruft