One of the major challenges of mobile ad hoc networks (MANETs) is the negative effect of mobility on routing. Because of node mobility paths are broken and have to be rebuilt causing delays and packet drops. In this paper, we propose a new routing technique for realistic heterogeneous MANETs where some nodes are fixed or moving very slowly. We applied the technique to AODV and DSR which are the two most commonly only used ad hoc network protocols. Simulations are performed with ns-2 to compare the performance of the original AODV and DSR with the proposed protocols MA-AODV and MA-DSR. The results show that the proposed protocols have higher packet delivery ratio, because paths are less probably broken.