Finished problem.js