#12 refactor