code for codepath for Rotten Tomatoes assignment