part way through refactor to new style