work on proper subfunctions -- 21 tests OK