added Eric's robit gibbs code
switched to using ifelse in conditional
Merge pull request #2 from dchudz/master

bring Eric's Robit Gibbs code into this repository