Energy efficiency and fault-tolerance are important issues in wireless ad hoc and sensor networks. Topology control as one of its low level services has therefore become an essential part. In this work, we present an implementation of one such topology control algorithm, the Thallner algorithm, in NS2, where we have evaluated its performance by the means of simulation. Thallner's topology construction algorithm is a fully distributed local algorithm, which efficiently constructs and maintains a k-regular topology graph with low overall transmission power and which is k-node-connected. In the second part of our work we present some modifications to the Thallner algorithm to improve its message and time complexity.