refactored model out of DAO