Assignment 2 for ECE474 class