refactoring on PhotoManager