added validations and average_rating method to the product model