most of modal dialogs done
complete implementation of dialogs