complete refactor into oo system