added example with alert dialog