sometimes the code is non-integer; this makes allowances for that