added tests
added implementation for some methods