factor out photodir name