add initWithDidDismissBlock method to source