I'm lost trying to figure out what this code is doing.