Fianl version of the SDA homework, I hope.