more logic to input events data