better separation of concern
update for #9