Added more functionality for debugging