Code for sensor added but commented until further testing