edited some sensor code to allow for timeouts