more effects and refactors