TODO, implement it and write tests.