revised script for failure before it gets subset id