version 1.0.1

bug fix and more powerful logic