raise ArgumentError instead of RuntimeError for wrong arguments