prepare for trap refactoring