looks like this is dupe code from https://github.com/mozilla/kuma/pull/1178 ?