added implementation of testing