wrote all tests for machine