unfinished work of refactoring