refaktor to model