added verbose mode
refactor