logging
logging + refactoring + some comments in controller