Can this be written in such a way so as not to add another boolean flag to this method signature? Preferably refactor it into a family of functions without flags, or if that's not easy, convert the flags to named hash options.