Split handler into 2 parts, func & side-effect