implemented half of the tests