Function definitions for test scripts