refactor leftover