Smarter j and k