added stream peek and effect for sideeffects