document code & remove one debug statement