Since this is the heart of the whole thing, could you comment this function more?