missing bcalc.c and refactor tests