generate case object. Fixes #9