removed dead code, added logger