create a class for dialog