added strategy, template and visitor pattern