update code to pass torture 3 partially