Edited Assignment 2 to use cond instead of if