use named functions for better stack traces