edit todo and add some tests