I think this would be better as a uint, so I don't have to think about whether anything is ever sign-extended