Completed week4 programming assignment