changed way of logging data