factory pattern + exyend fix