changes gallery layout