bug#1 - refactoring