ex 1.3.26 - partial solution, but one case still doesn't work