v2: another version of 9.c