My code from CSCI 2270 at CU Boulder