Updated to use new pebble api