Run-time Reconfiguration in Wireless Sensor Networks