dialog now takes two params