The easiest, and best solution, is to get an accountant involved.