added todo
added comment
converted to log probabilities and unboxed floats
tests working