Implementation code for aim 2 of Matt Jenny and Linda Zhang's capstone project