complete problem 7 & test with mocha