merge, debug & refactor