cleanup hash code, it makes no sense to have an extra type for the mask