moving doc init to parent init call