factor out handler dispatching
some more effect notes