figured out what: use a valuecontainer to do the storage.

also put implicits in companion object.