updated todo and made some style/correctness changes