how endnote works