Changed Implementation of retrieving photos