Updated programming assignment 2 solution