necessary changes to sync with Messages example