added logger, fixed parser