added tests functionality