refactored wolfram