added 0 log 0  = 0 in entropy calculations