file containing solution for programming assignment 2