add some more capabilities

 * it can set a value
 * it can return a value with a given type
 * it can set a value with arbitrary type