Completes assignment 2