debugging stuff + refactoring + ...