Add factory method example