Use an enum rather than a string for the function.