Worked on lectures 5-7