Assignment 4 for cs369