logic from view separation in gallery.content
more flexibility