extract command parsing into out_calculator