fixed test 7 to work with function defs