refactoring + clarifying some stuff