updating script to work in jenkins