beforeOut -> beforeInit