added build and template method patterns