model layer implemented