splitting out module with side-effects