Implement some functions for debugging