reduce code size with get_hexvars()