adding debug messages