script is working with security enabled