submission for programming assignment 2