added logger code