tested ruby wrapper, fixed some bugs, seems to work now