fixed up example to output stuff
another version using more inheritance
Merge pull request #1 from tansaku/master

fixed up example to output stuff