work on proper subfunctions -- 21 tests pass