sensor detection rewritten
added taillight function