loan model and validations