trumpet refactor