fixing algo for 2-node base case