added assert implementation