The previous code expected the hash to use the mac addresses as the keys, the original code had the indices as the keys.