ruby impl of wizards