Added a test script to validate function is working