First functional version to save photos