code for the raffle exercise, v1