had to fix rounding errors here, not 100% sure i did it right, i should really remake this from the hrmc stuff that is much more updated