updating script and minor change in the UI