JAMA Programming Task 2