implement model and DAO