consistency and error checking