setup and test internal events