added assert style error checking