This is the second part of Week4 assignment