changes for chekcing parent type