moved loadidentity function into for loop, image is now ok but why?