improving debug utilities