added exercise7.js