added argument errors for invalid inputs