listener for gallery button