Smart devices and their connections to the Internet of Things (IoT) have been the subject of many papers in the past decade. One of the transportation subjects of IoT is a smart junction. This research deals with the case of this junction, where several cars approach the intersection from various directions, and a smart traffic light must decide about the time intervals of RED and GREEN in each direction, with our novel approach that is based not only on the number of vehicles in each lane, but also on other factors such as the type of vehicles (e.g. emergency vehicles), and the social characteristics of the passengers (e.g. a handicapped person, a student who is late for an exam). Those factors will be gleaned from the IoT network amongst cars, traffic lights, individuals, municipality data, and more. Once those priorities have been examined, they are fed into the algorithm we have devised, and outputted as a timing schedule for the different sides of the intersection, taking also into consideration the cars physical attributes such as length and speed. In this paper we present the algorithm, the prioritizing research, its implementation in the algorithm and our experimental results.