#12 refactoring