improved functionality, using debug writes for now