refactor model / repo style