initial refactoring of node func spec test