updated dbGallery
training API tweaks