reformatted data for galleries table