Refactoring + correction