changed len back to length for conformity to previous databases. 
Fixed the [0] index issue for labelSets