refactored the debugging msges