I know this you just refactored the conditional, but do you know what `type === 7` means, it could use a comment.