update sensor related code