update  all KL methods

@karlnapf 
I send all the changes at one shot to see if it work or not.
Let me know your suggestion so that I can send PRs separately for KL methods.
so cut here.
If you want to re-use the matrix, pull its generation into a helper function