programming assignment 2 FINAL