rank k not working too well