added some handy functions for debugging