Complete most of assignment 2