edited and added tests for some use cases