created a star rating in a helper method