more cautious data handling
added logger, toString