added pseudo code and graphs to writeup