added debt history query