Stage 6 for calc. Use templates and inheriting