add weighted quickunion class