implemented function to find sub_types