wrote some of the test functions