move stuff to model