refactor model tests