general refactor needed