starting from resid=123 (changed from 121)