fixes BE-11 refactored code from procedural to OO