Refactored is_subset_of to work correctly and pass all tests