added logger for debugging purposes