rewrite kutil_whexvcb into a loop, much nicer