debug logging. oh and it kind of works