added minor new functions to aid in debugging.