solved functions challenge.js