use dialog instead of widget