fixed some things in predict and now taking logprob