update reference implementation