Assignment 4: complete