loop now starts at x=1 rather than x=0