refactoring PPG hack demo into proper widget