add validation for k