What did David do in his distress?