Inline function used once to shorten the code.