error checking and assert
No need for this error check.