add convenient util functions for debugging