change the signature of factory method