Merge pull request #8 from mtunique/master

newest pull
bugs fixed, all to ROI
Merge pull request #16 from assuming/master

all to yield format, several bugs fixed