adding dialogs... and some fixes