named generator function to help debugging