wrote working version of find_regions()