Made it fool proof and added dialogs