added throwing error if rating is bigger than 5 or smaller than 1