Two functions added for debugging.