How to reduce tax on capital loss