Simplified implementation of the basic registerFunction