adding better validation for argument input and tests