Sam's code.