advanced test-driven calculator