code cleaning
code cleaning
added 'logging'