added logging option
fixed logging
Merge pull request #6 from rubenCodeforges/refactoring

Refactoring