extract effects into a separate module