fix the part_type variable to check for the type