Sean's code for CS463 MPs