add factory method sample and that stdout.