first implementation of routes that callback into user-specified functions