Added code to writeup