replace parent with parent_id