accidently had rEnd=100 hard-coded