Updated for programming assignment 2