Updated gem to use the new API