formatting and calculator