fixed error in assignment4