can you explain to me how it works? (because in the process you'll probably find the bug yourself )