Modifying spell function