fixes before big refactoring