remove the nested functions from the fragility curves js file