Final version of assignment 1