full function of exercise 9 part 1
-(we think still not tested/set for machine)