changes to logic for handlin offline access