extra error checking