Add factory method.