update code with sensors