todo & refactor
code refactor