refactoring and increasing coverage
Merge remote-tracking branch 'origin/master'