updated programming assignment 2