added upper limit on displayable photos