refactor ETag stuff