refactor methods from driver to model