changed printing error message to Raising an ArgumentError