added tests and todos