[a working debug version]