add children with prototype based inheritance and overriding