Very similar questions to this have been asked on here before, but I have spent hours trying to figure out this code, which I am sure reflects my actual lack of understandin