better handling of photo data