adding resilience to bad json
adding duration count