updated script to fetch elastic2