I get what this function does but it deserves a descriptive comment, I think.