changed relational sampling to uniform
optional plotting