implement a simple debugging helper function