pebble.js conversion