text and diagram from thinkrf.com/pyrf/