fixed negative input value for k