making the gallery work:)