making this more formulaky

turning all my previous code into formulas to finish things up with the
razuna side of things