adding some alert dialogs but still needs improvements