implemented no argument case overload for invert() and now invert() takes int as argument