more involved example
fixes in factory
use standard factory for pretty printing