the calc_output needs a refactor