added assert statement for error message