Copied more of Katie's old code.