add $child support: fix #2 , and fix #6