refactoring cut; mainl indentantion problems