support more variants of function