photos logic