Figured out Sam's logic for the project