add an apply toplevel functions for enumerations