big refactoring 2