Added code for programming assignment