Now leader is elected based on an id instead of port