added the if(names != null) to disable learning
also added an initalTrust if names is not initialized