Patch 1

Tweak Peter's code to more reflect that found in R vis-a-vis 2pi range