add a dump method to help debugging