update for handle empty responses