Solved assignment week 2