modified gallery layout