changed rows for gallery