add tostring to debug output