bhattacharyya implemented