tweak, fix a subtle bug in terms of interface
twea
fix the nested pattern bug