error checking on modes