The completed programming assignment 2