linefollower code adjusted to work with statemachine