adapted to new ruby sdk interface