working on json response for galleries