begin of dialog inplementation