Assignment 2 for CSE 506