made major changes to reco() and dialog management