Used Module in Mathematica test function to allow for local variable definition