change some factory methods

Change some factory methods