k, random error fixed