contains factory method and abstract method