reorganize & refactor