imeplement js-models

fix parenting