finalize gallery