add existing code

basic idea at this point is that you do every operation with every
variable even if you already have it b/c why not and it keeps it simple,
although rounding error could be a problem