Week 1 Homework for Salim

nice use of separate functions to keep it clean.