printing with parent id