scripts for debugging Johan's issue