using uint16_t instead of int for the contrib and offset values