refactored according to styleguide