- remove the debug log
- generalise the hack