final perfect version of Memorizer