sectond draft of programming assignment 2