add more doc and examples  (nested version does not work yet)