some refractoring of the tests