change assignment so heads are repointed instead of leaves
fix bad variable name
add UF initialization
rewrite connect to consider height instead of size