updated for gallery update branch