writing test functions