Utility functions for functions