factory pattern is added