Added subtractScalar function