simple factory method design pattern