changes to add franchise functionality