Why move this block down? You are using callback before it is defined.