A Dynamic Topology Construction Algorithm for Self-Organizing Wireless Sensor Networks