Home loans

Does it matter whether or not I withdrawal the $20k separately than the remaining amount, or can I just withdrawal all $50k and the government would still only charge me tax on the $30k?