-added todo
-refactored code to get slightly higher test coverage