implement the remainder of the gallery API