Add comments for Sam's code