solution 4.js