some refactoring so the builder can be used as a host for different
tasks