week 1 solution polished according with mentor's comments