Tdh merged 2

Thanks for the commenting, it helps a lot. Nevermind about the return value; I didn't follow what this code was doing.