added error and sensoring