tentative solution to galleries problem