updated j_calc.lua to accept multiple arguments
todo: exception handling