added logger
Added tests