fixed typo n for k