working on photo gallery with db