What's the purpose of calculating a k here?