improved image alignment