some changes for gallery