additional error checking