added function to return parent