added test for StackMachine