fixed implementation of the tests