It does work, but I don't understand the code. Could you expain it?