removed some unneeded functions, only selecting needed columns for gallery