Optimizing range aware localization in wireless sensor networks (WSNs)