refactoring, removed unused stuff