new util code, power map robust and working