refactoring - build method