basic level of error checking