changed exception to be RuntimeError