udpate Factory Pattern