changed exception to runtime_error