Refactoring : extract calculator in dedicated package