Change function to a named function for debugging purposes