refasctor in a more oop fashion