refactor+ cleaning