replaced result controller delegate by using blocks