refactored generate_blank