rewrote the path loss calulations