Modifed sum pair loop - still not working