refactor model classes