Fixed named parameter naming conflict.
Updated argument input validation to reflect the addition of K value as a program argument.