should this ``raise`` instead of ``assert``?