Final version of assignment 2