Fixing algo + tests with k=3