add response code handle method