Implementation of gallery