added tests and model