fixed the result when no math operator is passed
removed redundant declaration