added photo saving