added spellbook function