refactored calculator and titleize