[refactor] use the factory design pattern to refine the model layer
[refactor] use the factory/builder design pattern to refine the model layer