add some applications and extensions of factory method.