polish code for gallery