added more debug messages