Changed the get nll function

Not using scan anymore, runs on the gpu and actually gives the right
answer.