small utils helpful both for debugging and as examples