Added some code to ladder test script