making more progress - need to figure out how to manage backreferences