execCommands function has been added for testing purposes