#3 refactor