example code for rating option