implemented Week-3-Assignment-2