added onCreateDialog method