Complete assignment 2 version 2