bug fix: reversed loops need to iterate *downward*