code from my assignments in MIT's Software Construction class (6.005)