todo & small refactor