added tests and updated views