Moved find_subpart, added test