solo 6, refactor procedural to OO