Wireless sensor networks are popular technologies that have extensive application areas. Localization is a crucial topic in wireless sensor networks. In wireless ad hoc and sensor networks, supporting nodes without Global Positioning System (GPS) capability have many applications in routing and surveying systems in use today. Time of Arrival (TOA) is a method used to estimate the location of a target node based on the correlation of the signals. In this paper, before proposing the Modified 3N algorithm in 3D, the 3N algorithm and Modified 3N algorithm in 2D are expressed. In the Modified 3N algorithm in 3D, four spheres were used to localize the target node in the algorithm. Nodes that are localized are now position-aware and possess the capability to share their positions. This newly found position-aware node is introduced into the pseudo anchor list. The neighboring network is intimated of this change and the gradual increase in the position-aware nodes in the network enable an enhanced localization performance. The simulations conducted have shown that the introduction of the knowledge of newly localized nodes into the network enhances its localization capability. The enhancements in both 2D and 3D environments are shown using MATLAB simulations and the obtained results are discussed.