fix bugs and add HCOC example