added exception if logprob is greater than 0 removed unwanted assert statemnts