Added a canonical function.

Used a variable function to shorten a common input.