sorted out debug messages