created script to perform sensor