I don't understand what this function does.