add switch id to long in tree