making the whatIf page dynamic: issue was in the function being called