Added db call, and modal dialog (still to be fixed)