some vectorization done in exact diagonal K