thrown away old stuff + refactoring