Code has been updated after 3 lecture