added assert to engine api