So should this be a flag in the function or let whatever calls it handle the dialog creation?