Modify like in tempest

Make this script similar to tempest version