update readme and add example for boxed types