finished adding psuedo code from slides. it
is very very psuedo...