Refactor

not in waterfall to improve logging