cleaned up to actually properly re-orient the image