implementing gallery