use Dr.Menzies code and try to do part4,no errors but should have bugs