This function, aside from creating other issues (will post them soon), seems incomplete. There's an IF...THEN statement that ends in limbo.