sendResponse method : suggestion to move this method