database and popup