Added k and n as params